1. Field of the Invention
This invention relates to applet caching. More particularly, though not exclusively, the invention relates to a system, method, and apparatus for persistently caching an applet on a client computer.
2. Problems in the Art
JAVA is an object-oriented programming language that was originally developed by Sun Microsystems and is popular on the internet, intranets, and other applications, including applications that run on embedded controllers. The JAVA language can be used to create both JAVA applets and JAVA applications.
JAVA applications and JAVA applets differ in a number of respects. JAVA applications are standalone programs that can be executed using only a JAVA interpreter. In contrast, JAVA applets typically run from within a world wide web browser or other application that is JAVA-enabled. When used within a web browser, references to a JAVA applet are embedded within a web page through the use of a special hypertext markup language (HTML) tag.
A client machine uses a JAVA-enabled web browser to load a web page with the embedded JAVA applet. The browser then downloads the JAVA applet from the web server hosting the applet. The web browser executes the JAVA applet locally.
One problem often associated with JAVA applets is long download time. Because applets are downloaded each time that a web page containing the applet is loaded, more bandwidth and download time is required for JAVA applets, as opposed to JAVA applications.
In addition to JAVA applications, other alternatives include common gateway interface (CGI) scripting and servlet applications. These alternatives rely upon the program or application being run on the server as opposed to the client. Executing the application on the server eliminates the download time associated with applets. However, it also increases the load on the server, requiring additional server resources. For this very reason, applets are often cached.
Caching may occur while using a web browser, as the web browser caches a limited amount of information previously downloaded by the web browser. This information may include web pages and applets. There are a number of problems with this type of cache being used for applets. First, the contents of a web browser cache are periodically emptied or flushed to make room for newer documents and resources. An applet is particularly susceptible to being flushed or deleted from the cache. Because the applet is usually large in comparison to other cached files, the browser's cache will remove the applet to make room for other files. In addition, where a web browser is used, frequently, a number of different files or resources may be cached. This requires that the applet be emptied from the cache to make room for the other materials. Those skilled in the art will appreciate the need for an applet cache which is not susceptible to being overwritten.
A further problem associated with web browser caches is that the caches are sometimes used even though a more recent JAVA applet is available or required. What is cached may not be the most current or most recent JAVA applet and thus may not operate properly, may not provide full functionally or may otherwise be undesirable. Thus, there is also a need in the art for a JAVA applet caching system that can determine whether the cached file or applet is the most current application or applet, and if not, download the most current applet as needed.
Another inherent problem with caches is that they are limited in size. As such, caches cannot store everything and are therefore periodically emptied or the cached files are otherwise overwritten with other files. When cache sizes are small, there is a problem if what needs to be cached is larger than the limitation in size. Thus, there is a need for an applet cache that is large enough to contain needed applets.
A further problem with applet caching is that the caching is not persistent. Different techniques such as least recently used (LRU) algorithms are used to remove items from the cache in order to make room for new additions. It may not be desirable to remove these applets, if it is known that the cached item will be required, and especially if the applets are large in size. If the applet is not in the cache when needed, then there is no benefit to caching the applet.
Yet another problem with certain types of caching is that the caching requires the use of a plug-in. The plug-in requires added installation time and overhead, and is therefore an impediment to use of an applet. The plug-in would require additional resources of the client computer as well as the additional installation process of the plug-in itself. JAVA can be run on a number of platforms, including in embedded processors or controllers. In these types of applications and others, there is even less likelihood that additional resources and/or plug-ins are available Still further, the communications channel may be limited, so that the time it takes for an uncached applet to be loaded may be even greater, more inconvenient, or otherwise undesirable. Thus, there is also need for an applet cache that does not require the use of a plug-in.